<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Assimp: Assimp::Exporter Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Assimp
   &#160;<span id="projectnumber">v3.0 (July 2012)</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespace_assimp.html">Assimp</a></li><li class="navelem"><a class="el" href="class_assimp_1_1_exporter.html">Exporter</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="class_assimp_1_1_exporter.html#nested-classes">Classes</a> &#124;
<a href="class_assimp_1_1_exporter.html#pub-types">Public Types</a> &#124;
<a href="class_assimp_1_1_exporter.html#pub-methods">Public Member Functions</a> &#124;
<a href="class_assimp_1_1_exporter.html#pro-attribs">Protected Attributes</a>  </div>
  <div class="headertitle">
<div class="title">Assimp::Exporter Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>CPP-API: The <a class="el" href="class_assimp_1_1_exporter.html" title="CPP-API: The Exporter class forms an C++ interface to the export functionality of the Open Asset Impo...">Exporter</a> class forms an C++ interface to the export functionality of the Open Asset Import Library.  
 <a href="class_assimp_1_1_exporter.html#details">More...</a></p>

<p><a href="class_assimp_1_1_exporter-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_assimp_1_1_exporter_1_1_export_format_entry.html">ExportFormatEntry</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Internal description of an <a class="el" href="namespace_assimp.html" title="Assimp&#39;s CPP-API and all internal APIs.">Assimp</a> export format option.  <a href="struct_assimp_1_1_exporter_1_1_export_format_entry.html#details">More...</a><br/></td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:aa67334a75cb24e030af984d01e622f3b"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_assimp_1_1_exporter.html#aa67334a75cb24e030af984d01e622f3b">fpExportFunc</a> )(const char *, <a class="el" href="class_assimp_1_1_i_o_system.html">IOSystem</a> *, const <a class="el" href="structai_scene.html">aiScene</a> *)</td></tr>
<tr class="memdesc:aa67334a75cb24e030af984d01e622f3b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function pointer type of a Export worker function.  <a href="class_assimp_1_1_exporter.html#aa67334a75cb24e030af984d01e622f3b"></a><br/></td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ab8edf249172567a78ca302278a415e35"><td class="memItemLeft" align="right" valign="top">aiReturn&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_assimp_1_1_exporter.html#ab8edf249172567a78ca302278a415e35">Export</a> (const <a class="el" href="structai_scene.html">aiScene</a> *pScene, const char *pFormatId, const char *pPath, unsigned int pPreprocessing=0u)</td></tr>
<tr class="memdesc:ab8edf249172567a78ca302278a415e35"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convenience function to export directly to a file.  <a href="class_assimp_1_1_exporter.html#ab8edf249172567a78ca302278a415e35"></a><br/></td></tr>
<tr class="memitem:aec681d38ca0bef85a015c64831a3566a"><td class="memItemLeft" align="right" valign="top">aiReturn&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_assimp_1_1_exporter.html#aec681d38ca0bef85a015c64831a3566a">Export</a> (const <a class="el" href="structai_scene.html">aiScene</a> *pScene, const std::string &amp;pFormatId, const std::string &amp;pPath, unsigned int pPreprocessing=0u)</td></tr>
<tr class="memitem:ac45a55fc178256576d2d21b58bd944a0"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_assimp_1_1_exporter.html#ac45a55fc178256576d2d21b58bd944a0">Exporter</a> ()</td></tr>
<tr class="memitem:a390c0950a3a164fc431e0797ae1a84d1"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="structai_export_data_blob.html">aiExportDataBlob</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_assimp_1_1_exporter.html#a390c0950a3a164fc431e0797ae1a84d1">ExportToBlob</a> (const <a class="el" href="structai_scene.html">aiScene</a> *pScene, const char *pFormatId, unsigned int pPreprocessing=0u)</td></tr>
<tr class="memdesc:a390c0950a3a164fc431e0797ae1a84d1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Exports the given scene to a chosen file format.  <a href="class_assimp_1_1_exporter.html#a390c0950a3a164fc431e0797ae1a84d1"></a><br/></td></tr>
<tr class="memitem:a02aa8c453879dc9365e7ec4d1e8d7413"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="structai_export_data_blob.html">aiExportDataBlob</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_assimp_1_1_exporter.html#a02aa8c453879dc9365e7ec4d1e8d7413">ExportToBlob</a> (const <a class="el" href="structai_scene.html">aiScene</a> *pScene, const std::string &amp;pFormatId, unsigned int pPreprocessing=0u)</td></tr>
<tr class="memitem:a8200b618c21c272c839c37060a871d48"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_assimp_1_1_exporter.html#a8200b618c21c272c839c37060a871d48">FreeBlob</a> ()</td></tr>
<tr class="memdesc:a8200b618c21c272c839c37060a871d48"><td class="mdescLeft">&#160;</td><td class="mdescRight">Frees the current blob.  <a href="class_assimp_1_1_exporter.html#a8200b618c21c272c839c37060a871d48"></a><br/></td></tr>
<tr class="memitem:aaee439cf6810d14eded4a12b9bc63e0b"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="structai_export_data_blob.html">aiExportDataBlob</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_assimp_1_1_exporter.html#aaee439cf6810d14eded4a12b9bc63e0b">GetBlob</a> () const </td></tr>
<tr class="memdesc:aaee439cf6810d14eded4a12b9bc63e0b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the blob obtained from the last call to <a class="el" href="class_assimp_1_1_exporter.html#a390c0950a3a164fc431e0797ae1a84d1" title="Exports the given scene to a chosen file format.">ExportToBlob</a>.  <a href="class_assimp_1_1_exporter.html#aaee439cf6810d14eded4a12b9bc63e0b"></a><br/></td></tr>
<tr class="memitem:ad5dae590c3f2b8aa5fc3e2b26f7886e3"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_assimp_1_1_exporter.html#ad5dae590c3f2b8aa5fc3e2b26f7886e3">GetErrorString</a> () const </td></tr>
<tr class="memdesc:ad5dae590c3f2b8aa5fc3e2b26f7886e3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns an error description of an error that occurred in <a class="el" href="class_assimp_1_1_exporter.html#ab8edf249172567a78ca302278a415e35" title="Convenience function to export directly to a file.">Export</a> or <a class="el" href="class_assimp_1_1_exporter.html#a390c0950a3a164fc431e0797ae1a84d1" title="Exports the given scene to a chosen file format.">ExportToBlob</a>.  <a href="class_assimp_1_1_exporter.html#ad5dae590c3f2b8aa5fc3e2b26f7886e3"></a><br/></td></tr>
<tr class="memitem:abfada264486a34c52ae43a762d5cbf01"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_assimp_1_1_exporter.html#abfada264486a34c52ae43a762d5cbf01">GetExportFormatCount</a> () const </td></tr>
<tr class="memdesc:abfada264486a34c52ae43a762d5cbf01"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of export file formats available in the current <a class="el" href="namespace_assimp.html" title="Assimp&#39;s CPP-API and all internal APIs.">Assimp</a> build.  <a href="class_assimp_1_1_exporter.html#abfada264486a34c52ae43a762d5cbf01"></a><br/></td></tr>
<tr class="memitem:a724e2a029ec38d7252f7a7169c9eb7e4"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="structai_export_format_desc.html">aiExportFormatDesc</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_assimp_1_1_exporter.html#a724e2a029ec38d7252f7a7169c9eb7e4">GetExportFormatDescription</a> (size_t pIndex) const </td></tr>
<tr class="memdesc:a724e2a029ec38d7252f7a7169c9eb7e4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a description of the nth export file format.  <a href="class_assimp_1_1_exporter.html#a724e2a029ec38d7252f7a7169c9eb7e4"></a><br/></td></tr>
<tr class="memitem:a736d66db1a94de7df6eb978975e8d47a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_assimp_1_1_i_o_system.html">IOSystem</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_assimp_1_1_exporter.html#a736d66db1a94de7df6eb978975e8d47a">GetIOHandler</a> () const </td></tr>
<tr class="memdesc:a736d66db1a94de7df6eb978975e8d47a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves the IO handler that is currently set.  <a href="class_assimp_1_1_exporter.html#a736d66db1a94de7df6eb978975e8d47a"></a><br/></td></tr>
<tr class="memitem:a75291079fa484c5769b36a80b1b393a5"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="structai_export_data_blob.html">aiExportDataBlob</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_assimp_1_1_exporter.html#a75291079fa484c5769b36a80b1b393a5">GetOrphanedBlob</a> () const </td></tr>
<tr class="memdesc:a75291079fa484c5769b36a80b1b393a5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Orphan the blob from the last call to <a class="el" href="class_assimp_1_1_exporter.html#a390c0950a3a164fc431e0797ae1a84d1" title="Exports the given scene to a chosen file format.">ExportToBlob</a>.  <a href="class_assimp_1_1_exporter.html#a75291079fa484c5769b36a80b1b393a5"></a><br/></td></tr>
<tr class="memitem:a9ae1196f04cceb0d35fde6229ba41d0b"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_assimp_1_1_exporter.html#a9ae1196f04cceb0d35fde6229ba41d0b">IsDefaultIOHandler</a> () const </td></tr>
<tr class="memdesc:a9ae1196f04cceb0d35fde6229ba41d0b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks whether a default IO handler is active A default handler is active as long the application doesn't supply its own custom IO handler via <a class="el" href="class_assimp_1_1_exporter.html#a054201cf78fa352b1281ea8b484f6e3a" title="Supplies a custom IO handler to the exporter to use to open and access files.">SetIOHandler()</a>.  <a href="class_assimp_1_1_exporter.html#a9ae1196f04cceb0d35fde6229ba41d0b"></a><br/></td></tr>
<tr class="memitem:ae65025d7c5a06a0c3e8655585f87e1c4"><td class="memItemLeft" align="right" valign="top">aiReturn&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_assimp_1_1_exporter.html#ae65025d7c5a06a0c3e8655585f87e1c4">RegisterExporter</a> (const <a class="el" href="struct_assimp_1_1_exporter_1_1_export_format_entry.html">ExportFormatEntry</a> &amp;desc)</td></tr>
<tr class="memdesc:ae65025d7c5a06a0c3e8655585f87e1c4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Register a custom exporter.  <a href="class_assimp_1_1_exporter.html#ae65025d7c5a06a0c3e8655585f87e1c4"></a><br/></td></tr>
<tr class="memitem:a054201cf78fa352b1281ea8b484f6e3a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_assimp_1_1_exporter.html#a054201cf78fa352b1281ea8b484f6e3a">SetIOHandler</a> (<a class="el" href="class_assimp_1_1_i_o_system.html">IOSystem</a> *pIOHandler)</td></tr>
<tr class="memdesc:a054201cf78fa352b1281ea8b484f6e3a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Supplies a custom IO handler to the exporter to use to open and access files.  <a href="class_assimp_1_1_exporter.html#a054201cf78fa352b1281ea8b484f6e3a"></a><br/></td></tr>
<tr class="memitem:afa5956ce18138b90396c505468d1e52b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_assimp_1_1_exporter.html#afa5956ce18138b90396c505468d1e52b">UnregisterExporter</a> (const char *id)</td></tr>
<tr class="memdesc:afa5956ce18138b90396c505468d1e52b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove an export format previously registered with <a class="el" href="class_assimp_1_1_exporter.html#ae65025d7c5a06a0c3e8655585f87e1c4" title="Register a custom exporter.">RegisterExporter</a> from the <a class="el" href="class_assimp_1_1_exporter.html#ac45a55fc178256576d2d21b58bd944a0">Exporter</a> instance (this can also be used to drop builtin exporters because those are implicitly registered using <a class="el" href="class_assimp_1_1_exporter.html#ae65025d7c5a06a0c3e8655585f87e1c4" title="Register a custom exporter.">RegisterExporter</a>).  <a href="class_assimp_1_1_exporter.html#afa5956ce18138b90396c505468d1e52b"></a><br/></td></tr>
<tr class="memitem:a52c3ba6c76c778fb5dd70ad30589fb2c"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_assimp_1_1_exporter.html#a52c3ba6c76c778fb5dd70ad30589fb2c">~Exporter</a> ()</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a75bc178ae29edc192e1c1935c31c42b2"><td class="memItemLeft" align="right" valign="top">ExporterPimpl *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_assimp_1_1_exporter.html#a75bc178ae29edc192e1c1935c31c42b2">pimpl</a></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>CPP-API: The <a class="el" href="class_assimp_1_1_exporter.html" title="CPP-API: The Exporter class forms an C++ interface to the export functionality of the Open Asset Impo...">Exporter</a> class forms an C++ interface to the export functionality of the Open Asset Import Library. </p>
<p>Note that the export interface is available only if <a class="el" href="namespace_assimp.html" title="Assimp&#39;s CPP-API and all internal APIs.">Assimp</a> has been built with ASSIMP_BUILD_NO_EXPORT not defined.</p>
<p>The interface is modelled after the importer interface and mostly symmetric. The same rules for threading etc. apply.</p>
<p>In a nutshell, there are two export interfaces: <a class="el" href="class_assimp_1_1_exporter.html#ab8edf249172567a78ca302278a415e35" title="Convenience function to export directly to a file.">Export</a>, which writes the output file(s) either to the regular file system or to a user-supplied #IOSystem, and <a class="el" href="class_assimp_1_1_exporter.html#a390c0950a3a164fc431e0797ae1a84d1" title="Exports the given scene to a chosen file format.">ExportToBlob</a> which returns a linked list of memory buffers (blob), each referring to one output file (in most cases there will be only one output file of course, but this extra complexity is needed since <a class="el" href="namespace_assimp.html" title="Assimp&#39;s CPP-API and all internal APIs.">Assimp</a> aims at supporting a wide range of file formats).</p>
<p><a class="el" href="class_assimp_1_1_exporter.html#a390c0950a3a164fc431e0797ae1a84d1" title="Exports the given scene to a chosen file format.">ExportToBlob</a> is especially useful if you intend to work with the data in-memory. </p>
</div><hr/><h2>Member Typedef Documentation</h2>
<a class="anchor" id="aa67334a75cb24e030af984d01e622f3b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void(* Assimp::Exporter::fpExportFunc)(const char *, <a class="el" href="class_assimp_1_1_i_o_system.html">IOSystem</a> *, const <a class="el" href="structai_scene.html">aiScene</a> *)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function pointer type of a Export worker function. </p>

</div>
</div>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ac45a55fc178256576d2d21b58bd944a0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Assimp::Exporter::Exporter </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a52c3ba6c76c778fb5dd70ad30589fb2c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Assimp::Exporter::~Exporter </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="ab8edf249172567a78ca302278a415e35"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">aiReturn Assimp::Exporter::Export </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structai_scene.html">aiScene</a> *&#160;</td>
          <td class="paramname"><em>pScene</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>pFormatId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>pPath</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>pPreprocessing</em> = <code>0u</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convenience function to export directly to a file. </p>
<p>Use #SetIOSystem to supply a custom <a class="el" href="class_assimp_1_1_i_o_system.html" title="CPP-API: Interface to the file system.">IOSystem</a> to gain fine-grained control about the output data flow of the export process. </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">pBlob</td><td>A data blob obtained from a previous call to <a class="el" href="cexport_8h.html#a742b4d8f6426a9930f81e3d33d7d4dc6" title="Exports the given scene to a chosen file format and writes the result file(s) to disk.">aiExportScene</a>. Must not be NULL. </td></tr>
    <tr><td class="paramname">pPath</td><td>Full target file name. Target must be accessible. </td></tr>
    <tr><td class="paramname">pPreprocessing</td><td>Accepts any choice of the #aiPostProcessing enumerated flags, but in reality only a subset of them makes sense here. Specifying 'preprocessing' flags is useful if the input scene does not conform to <a class="el" href="namespace_assimp.html" title="Assimp&#39;s CPP-API and all internal APIs.">Assimp</a>'s default conventions as specified in the <a class="el" href="data.html">Data Structures Page </a>. In short, this means the geometry data should use a right-handed coordinate systems, face winding should be counter-clockwise and the UV coordinate origin is assumed to be in the upper left. The <a class="el" href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410a133fd1162674e68bf8cd17070898a936">aiProcess_MakeLeftHanded</a>, <a class="el" href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410a06922b6a1f1cd8186f9fdafb471c813e">aiProcess_FlipUVs</a> and <a class="el" href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410a429a11bf7ace46f039f55de895505d4a">aiProcess_FlipWindingOrder</a> flags are used in the import side to allow users to have those defaults automatically adapted to their conventions. Specifying those flags for exporting has the opposite effect, respectively. Some other of the <a class="el" href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410" title="Defines the flags for all possible post processing steps.">aiPostProcessSteps</a> enumerated values may be useful as well, but you'll need to try out what their effect on the exported file is. Many formats impose their own restrictions on the structure of the geometry stored therein, so some preprocessing may have little or no effect at all, or may be redundant as exporters would apply them anyhow. A good example is triangulation - whilst you can enforce it by specifying the <a class="el" href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410a9c3de834f0307f31fa2b1b6d05dd592b">aiProcess_Triangulate</a> flag, most export formats support only triangulate data so they would run the step even if it wasn't requested. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>AI_SUCCESS if everything was fine. </dd></dl>

</div>
</div>
<a class="anchor" id="aec681d38ca0bef85a015c64831a3566a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">aiReturn Assimp::Exporter::Export </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structai_scene.html">aiScene</a> *&#160;</td>
          <td class="paramname"><em>pScene</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>pFormatId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>pPath</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>pPreprocessing</em> = <code>0u</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a390c0950a3a164fc431e0797ae1a84d1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="structai_export_data_blob.html">aiExportDataBlob</a>* Assimp::Exporter::ExportToBlob </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structai_scene.html">aiScene</a> *&#160;</td>
          <td class="paramname"><em>pScene</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>pFormatId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>pPreprocessing</em> = <code>0u</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Exports the given scene to a chosen file format. </p>
<p>Returns the exported data as a binary blob which you can write into a file or something. When you're done with the data, simply let the <a class="el" href="class_assimp_1_1_exporter.html#ac45a55fc178256576d2d21b58bd944a0">Exporter</a> instance go out of scope to have it released automatically. </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">pScene</td><td>The scene to export. Stays in possession of the caller, is not changed by the function. </td></tr>
    <tr><td class="paramname">pFormatId</td><td>ID string to specify to which format you want to export to. Use <a class="el" href="class_assimp_1_1_exporter.html#abfada264486a34c52ae43a762d5cbf01" title="Returns the number of export file formats available in the current Assimp build.">GetExportFormatCount</a> / <a class="el" href="class_assimp_1_1_exporter.html#a724e2a029ec38d7252f7a7169c9eb7e4" title="Returns a description of the nth export file format.">GetExportFormatDescription</a> to learn which export formats are available. </td></tr>
    <tr><td class="paramname">pPreprocessing</td><td>See the documentation for <a class="el" href="class_assimp_1_1_exporter.html#ab8edf249172567a78ca302278a415e35" title="Convenience function to export directly to a file.">Export</a> </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>the exported data or NULL in case of error. </dd></dl>
<dl class="section note"><dt>Note:</dt><dd>If the <a class="el" href="class_assimp_1_1_exporter.html" title="CPP-API: The Exporter class forms an C++ interface to the export functionality of the Open Asset Impo...">Exporter</a> instance did already hold a blob from a previous call to <a class="el" href="class_assimp_1_1_exporter.html#a390c0950a3a164fc431e0797ae1a84d1" title="Exports the given scene to a chosen file format.">ExportToBlob</a>, it will be disposed. Any IO handlers set via <a class="el" href="class_assimp_1_1_exporter.html#a054201cf78fa352b1281ea8b484f6e3a" title="Supplies a custom IO handler to the exporter to use to open and access files.">SetIOHandler</a> are ignored here. </dd></dl>

</div>
</div>
<a class="anchor" id="a02aa8c453879dc9365e7ec4d1e8d7413"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="structai_export_data_blob.html">aiExportDataBlob</a> * Assimp::Exporter::ExportToBlob </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structai_scene.html">aiScene</a> *&#160;</td>
          <td class="paramname"><em>pScene</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>pFormatId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>pPreprocessing</em> = <code>0u</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a8200b618c21c272c839c37060a871d48"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Assimp::Exporter::FreeBlob </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Frees the current blob. </p>
<p>The function does nothing if no blob has previously been previously produced via <a class="el" href="class_assimp_1_1_exporter.html#a390c0950a3a164fc431e0797ae1a84d1" title="Exports the given scene to a chosen file format.">ExportToBlob</a>. <a class="el" href="class_assimp_1_1_exporter.html#a8200b618c21c272c839c37060a871d48" title="Frees the current blob.">FreeBlob</a> is called automatically by the destructor. The only reason to call it manually would be to reclain as much storage as possible without giving up the <a class="el" href="class_assimp_1_1_exporter.html#ac45a55fc178256576d2d21b58bd944a0">Exporter</a> instance yet. </p>

</div>
</div>
<a class="anchor" id="aaee439cf6810d14eded4a12b9bc63e0b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="structai_export_data_blob.html">aiExportDataBlob</a>* Assimp::Exporter::GetBlob </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return the blob obtained from the last call to <a class="el" href="class_assimp_1_1_exporter.html#a390c0950a3a164fc431e0797ae1a84d1" title="Exports the given scene to a chosen file format.">ExportToBlob</a>. </p>

</div>
</div>
<a class="anchor" id="ad5dae590c3f2b8aa5fc3e2b26f7886e3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* Assimp::Exporter::GetErrorString </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns an error description of an error that occurred in <a class="el" href="class_assimp_1_1_exporter.html#ab8edf249172567a78ca302278a415e35" title="Convenience function to export directly to a file.">Export</a> or <a class="el" href="class_assimp_1_1_exporter.html#a390c0950a3a164fc431e0797ae1a84d1" title="Exports the given scene to a chosen file format.">ExportToBlob</a>. </p>
<p>Returns an empty string if no error occurred. </p>
<dl class="section return"><dt>Returns:</dt><dd>A description of the last error, an empty string if no error occurred. The string is never NULL.</dd></dl>
<dl class="section note"><dt>Note:</dt><dd>The returned function remains valid until one of the following methods is called: <a class="el" href="class_assimp_1_1_exporter.html#ab8edf249172567a78ca302278a415e35" title="Convenience function to export directly to a file.">Export</a>, <a class="el" href="class_assimp_1_1_exporter.html#a390c0950a3a164fc431e0797ae1a84d1" title="Exports the given scene to a chosen file format.">ExportToBlob</a>, <a class="el" href="class_assimp_1_1_exporter.html#a8200b618c21c272c839c37060a871d48" title="Frees the current blob.">FreeBlob</a> </dd></dl>

</div>
</div>
<a class="anchor" id="abfada264486a34c52ae43a762d5cbf01"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t Assimp::Exporter::GetExportFormatCount </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the number of export file formats available in the current <a class="el" href="namespace_assimp.html" title="Assimp&#39;s CPP-API and all internal APIs.">Assimp</a> build. </p>
<p>Use #Exporter::GetExportFormatDescription to retrieve infos of a specific export format </p>

</div>
</div>
<a class="anchor" id="a724e2a029ec38d7252f7a7169c9eb7e4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="structai_export_format_desc.html">aiExportFormatDesc</a>* Assimp::Exporter::GetExportFormatDescription </td>
          <td>(</td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>pIndex</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns a description of the nth export file format. </p>
<p>Use # #Exporter::GetExportFormatCount to learn how many export formats are supported. </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">pIndex</td><td>Index of the export format to retrieve information for. Valid range is 0 to #Exporter::GetExportFormatCount </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>A description of that specific export format. NULL if pIndex is out of range. </dd></dl>

</div>
</div>
<a class="anchor" id="a736d66db1a94de7df6eb978975e8d47a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_assimp_1_1_i_o_system.html">IOSystem</a>* Assimp::Exporter::GetIOHandler </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Retrieves the IO handler that is currently set. </p>
<p>You can use <a class="el" href="class_assimp_1_1_exporter.html#a9ae1196f04cceb0d35fde6229ba41d0b" title="Checks whether a default IO handler is active A default handler is active as long the application doe...">IsDefaultIOHandler()</a> to check whether the returned interface is the default IO handler provided by ASSIMP. The default handler is active as long the application doesn't supply its own custom IO handler via <a class="el" href="class_assimp_1_1_exporter.html#a054201cf78fa352b1281ea8b484f6e3a" title="Supplies a custom IO handler to the exporter to use to open and access files.">SetIOHandler()</a>. </p>
<dl class="section return"><dt>Returns:</dt><dd>A valid <a class="el" href="class_assimp_1_1_i_o_system.html" title="CPP-API: Interface to the file system.">IOSystem</a> interface, never NULL. </dd></dl>

</div>
</div>
<a class="anchor" id="a75291079fa484c5769b36a80b1b393a5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="structai_export_data_blob.html">aiExportDataBlob</a>* Assimp::Exporter::GetOrphanedBlob </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Orphan the blob from the last call to <a class="el" href="class_assimp_1_1_exporter.html#a390c0950a3a164fc431e0797ae1a84d1" title="Exports the given scene to a chosen file format.">ExportToBlob</a>. </p>
<p>This means the caller takes ownership and is thus responsible for calling the C API function <a class="el" href="cexport_8h.html#a172fce67139ae113245b0deb12bc8e56" title="Releases the memory associated with the given exported data.">aiReleaseExportBlob</a> to release it. </p>

</div>
</div>
<a class="anchor" id="a9ae1196f04cceb0d35fde6229ba41d0b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Assimp::Exporter::IsDefaultIOHandler </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Checks whether a default IO handler is active A default handler is active as long the application doesn't supply its own custom IO handler via <a class="el" href="class_assimp_1_1_exporter.html#a054201cf78fa352b1281ea8b484f6e3a" title="Supplies a custom IO handler to the exporter to use to open and access files.">SetIOHandler()</a>. </p>
<dl class="section return"><dt>Returns:</dt><dd>true by default </dd></dl>

</div>
</div>
<a class="anchor" id="ae65025d7c5a06a0c3e8655585f87e1c4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">aiReturn Assimp::Exporter::RegisterExporter </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="struct_assimp_1_1_exporter_1_1_export_format_entry.html">ExportFormatEntry</a> &amp;&#160;</td>
          <td class="paramname"><em>desc</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Register a custom exporter. </p>
<p>Custom export formats are limited to to the current <a class="el" href="class_assimp_1_1_exporter.html#ac45a55fc178256576d2d21b58bd944a0">Exporter</a> instance and do not affect the library globally. </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">desc</td><td><a class="el" href="class_assimp_1_1_exporter.html" title="CPP-API: The Exporter class forms an C++ interface to the export functionality of the Open Asset Impo...">Exporter</a> description. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>aiReturn_SUCCESS if the export format was successfully registered. A common cause that would prevent an exporter from being registered is that its format id is already occupied by another format. </dd></dl>

</div>
</div>
<a class="anchor" id="a054201cf78fa352b1281ea8b484f6e3a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Assimp::Exporter::SetIOHandler </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_assimp_1_1_i_o_system.html">IOSystem</a> *&#160;</td>
          <td class="paramname"><em>pIOHandler</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Supplies a custom IO handler to the exporter to use to open and access files. </p>
<p>If you need <a class="el" href="class_assimp_1_1_exporter.html#ab8edf249172567a78ca302278a415e35" title="Convenience function to export directly to a file.">Export</a> to use custom IO logic to access the files, you need to supply a custom implementation of <a class="el" href="class_assimp_1_1_i_o_system.html" title="CPP-API: Interface to the file system.">IOSystem</a> and IOFile to the exporter.</p>
<p><a class="el" href="class_assimp_1_1_exporter.html#ac45a55fc178256576d2d21b58bd944a0">Exporter</a> takes ownership of the object and will destroy it afterwards. The previously assigned handler will be deleted. Pass NULL to take again ownership of your <a class="el" href="class_assimp_1_1_i_o_system.html" title="CPP-API: Interface to the file system.">IOSystem</a> and reset <a class="el" href="namespace_assimp.html" title="Assimp&#39;s CPP-API and all internal APIs.">Assimp</a> to use its default implementation, which uses plain file IO.</p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">pIOHandler</td><td>The IO handler to be used in all file accesses of the <a class="el" href="class_assimp_1_1_importer.html" title="CPP-API: The Importer class forms an C++ interface to the functionality of the Open Asset Import Libr...">Importer</a>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="afa5956ce18138b90396c505468d1e52b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Assimp::Exporter::UnregisterExporter </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>id</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Remove an export format previously registered with <a class="el" href="class_assimp_1_1_exporter.html#ae65025d7c5a06a0c3e8655585f87e1c4" title="Register a custom exporter.">RegisterExporter</a> from the <a class="el" href="class_assimp_1_1_exporter.html#ac45a55fc178256576d2d21b58bd944a0">Exporter</a> instance (this can also be used to drop builtin exporters because those are implicitly registered using <a class="el" href="class_assimp_1_1_exporter.html#ae65025d7c5a06a0c3e8655585f87e1c4" title="Register a custom exporter.">RegisterExporter</a>). </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">id</td><td>Format id to be unregistered, this refers to the 'id' field of <a class="el" href="structai_export_format_desc.html" title="Describes an file format which Assimp can export to.">aiExportFormatDesc</a>. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note:</dt><dd>Calling this method on a format description not yet registered has no effect. </dd></dl>

</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="a75bc178ae29edc192e1c1935c31c42b2"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">ExporterPimpl* Assimp::Exporter::pimpl</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="_exporter_8hpp.html">Exporter.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Tue Jul 10 2012 17:55:53 for Assimp by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.1.1
</small></address>
</body>
</html>
